In most computing systems, low level instruction code is used as an intermediary between the hardware components of the computing system and the operating software and other high-level software executing on the computing system. In some computer systems, this low level instruction code is known as the Basic Input and Output System (“BIOS”). The BIOS provides a set of software routines that allow high level software to interact with the hardware components of the computing system using standard calls.
Because of limitations of the BIOS in many PC-compatible computers, a new specification for creating the firmware that is responsible for booting the computer and for intermediating the communication between the operating system and the hardware has been proposed. The new specification is called the Extensible Firmware Interface (“EFI”) specification and is available from INTEL CORPORATION.
The EFI specification describes an interface between the operating system and the system firmware. In particular, the EFI specification defines the interface that platform firmware must implement and the interface that the operating system may use in booting. How the firmware implements the interface is left up to the manufacturer of the firmware. The EFI specification provides protocols for EFI drivers to communicate with each other, and the EFI core provides functions such as allocation of memory, creating events, setting the clock, and many others. This is accomplished through a formal and complete abstract specification of the software-visible interface presented to the operating system by the platform and the firmware.
The EFI is capable of providing services to other applications. Services are implemented by modules that may be loaded by a boot loader when the EFI is started. The services may provide memory management, domain services, driver services, protocol services, and others. PS/2 drivers, such as an EFI mouse driver, must follow a protocol of data exchange during initialization of or while in communication with a PS/2 device, such as a mouse, floppy disk drive, or joy stick. This protocol of data exchange involves sequences of bytes or packets of data read from or exchanged with the PS/2 device. The PS/2 device is slow in comparison to the central processing unit (CPU) of a computing apparatus. The PS/2 device may even be one thousand times slower than the CPU. Thus, after a byte of data is read from the PS/2 device, there is a waiting period before the next byte of data appears at a device controller.
However, waiting on the next byte of data is not always acceptable when a computing system or apparatus has other tasks to perform. For instance, when an application calls a driver to quickly check if there is a change in the mouse position, the application may not be interested in retrieving the data immediately. Thus, when procedures, such as a timer event, cause the application to wait for the data other events are also on hold, which is inefficient. Moreover, some timer events time out in the middle of a sequence and are terminated after a fixed amount of elapsed time. Accordingly, there is a need for a method, system, and apparatus for tracking a state of communication between a PS/2 device and a PS/2 device driver within an EFI environment.
It is with respect to these considerations and others that the various embodiments of the invention have been made.